package com.zhou.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisPublish {
    @Autowired
    private RedisTemplate<String,String> redisTemplate;

    private static final String CHANNEL = "flight_path_chanel";

    private static final String CHANEL = "flight_path_chane";

    private static final String PATH = "injest_flight_path";

    public void pushCHANNEL(String msg){
        redisTemplate.convertAndSend(CHANNEL, msg);
    }

    public void pushCHANEL(String msg){
        redisTemplate.convertAndSend(CHANEL, msg);
    }

    public void pushPATH(String msg){redisTemplate.convertAndSend(PATH, msg);}

}
